<template>
  <div>
    <!-- 头部tab -->
    <!-- <div class="top_tab">
      <div class="left" @click="back()">
        <img src="../assets/order_center/shangs.png">
      </div>
      <span>我的下级</span>
      <div class="right"></div>
    </div>
		<div class="n"></div> -->
		<!-- 列表 -->
		<div class="list">
			<div class="bar" v-for="(item,index) in detailList" :key="index">
				<div class="pic">
					<img :src="item.appimage">
				</div>
				<div class="name">
					<span>{{item.name}}</span>
				</div>
				<div class="cate">
					<span>收益：{{item.claim_price}}</span>
				</div>
				<div class="time">
					<span>{{item.created_at}}</span>
				</div>
			</div>
		
		</div>
		 <div class="without" v-if="detailList.length == 0">
          <img src="../assets/order_center/kongbai.png" alt="">
          <span>暂无数据</span>
		</div> 
	</div>
</template>

<script>
export default {
  name: 'subordinate',
  data () {
    return {
     detailList:[]
    } 
  },
  methods:{
    back: function() {
      this.$router.go(-1);
		},  
    detail:function(){
      let self = this;
      let url = "/api/login/down";
			self.httpPost(url,{user_id:this.myid,token:this.token,p:1,psize:999},function(res) {
				if (res.code === 200) {
          self.detailList=res.data.data;
				}else if(res.code === 288){
					self.$message.error(res.msg);
        }
      })
		},
	
	},created(){
			document.title = "我的分享";
			this.token = localStorage.getItem('mytoken');
			this.myid = localStorage.getItem('myid');
			this.detail(); 
  	},
}
</script>


<style scoped>
.top_tab{
  width:100%;
  padding:.2rem .3rem;
  background: #FFF;
  display: flex;
	position: fixed;
  justify-content: space-between;
  align-items: center;
  box-shadow: .01rem .01rem .06rem #ddd;
}
.top_tab span{
  color:#333;
  font-size: .36rem;
}
.top_tab  img{
  width:.43rem;
	height:.46rem;
}
.n{
	height:.92rem;
}
.list{
	width:100%;
	background: #FFF;
	margin-top: .1rem;
}
.list .bar{
	width:100%;
	height:1.10rem;
	padding: .3rem .3rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #e4e4e4;
}
.list .bar .pic{
	width:.85rem;
	height:.85rem;
	border-radius: 50%;
}
.list .bar .pic img{
	width:100%;
	height:100%;
	border-radius: 50%;
}
.list .bar .name span{
	font-size: .28rem;
	color:#f2954a;
}
.list .bar .cate{
	height:.33rem;
  line-height: .30rem;
  border-radius:4px; 
  font-size: .28rem;
	color: #f2954a;
  text-align: center;
	border:1px solid #f2954a;
}
.list .bar .time span{
	font-size: .28rem;
	color:#c4c3c2;
}
</style>




